#include <stdio.h>

int main(int argc, const char* argv[])
{   
    FILE *fp = fopen("./user.text","r");
    if(fp == NULL)
    {
        printf("文件打开失败");
        return 0;
    }
    /*  
     int c;
     c= fgetc(fp);
     printf("%c\n",c);

    c= fgetc(fp);
     printf("%c\n",c);
     c= fgetc(fp);
     printf("%c\n",c); */

     int c;
     while ((c=fgetc(fp))!=EOF)
     {
        printf("%c",c);
     }
        while (fclose(fp)==-1)
        {
            printf("文件关闭失败\n");
        }


    return 0;
}